<?php 
if (!defined('VALIDADMIN')) die ('Access Denied.');
$modaction=$_REQUEST['modaction'];
//模块基础参数数组
$baseconfig=array(
dourldefault=>dourl('',$mod,$adminpanel),
//团购产品
dourllist=>dourl('list',$mod,$adminpanel),
dourladd=>dourl('add',$mod,$adminpanel),
dourledit=>dourl('edit',$mod,$adminpanel),
dourldel=>dourl('delete',$mod,$adminpanel),
dourlclose=>dourl('close',$mod,$adminpanel),
dourlopen=>dourl('open',$mod,$adminpanel),

//团购产品
dourlmlist=>dourl('mlist',$mod,$adminpanel),
dourlmadd=>dourl('madd',$mod,$adminpanel),
dourlmedit=>dourl('medit',$mod,$adminpanel),
dourlmdel=>dourl('mdel',$mod,$adminpanel),



mod=>$mod,
adminpanel=>$adminpanel
);

//获取商家列表
function getmenchantslist($selectval=0,$addval='',$addkey='') {
	$sql="select id,name from sn_group_menchant where isdel = 'N'";
	$arr=$GLOBALS[db]->getlist($sql);
	$optinstr="<select name='fm_merchant_id' id='fm_merchant_id' >";
	if($addval!==''&&$addkey!=='')
	{
		$optinstr.="<option value='".$addval."'>".$addkey."</option>";
	}
	foreach ($arr as $key => $value) {
		$optinstr.="<option value='";
		$optinstr.=$arr[$key]['id']==$selectval?$arr[$key]['id']."' selected>".$arr[$key]['name']."</option>":$arr[$key]['id']."' >".$arr[$key]['name']."</option>";

	}
	$optinstr.="</select > ";
	return $optinstr;
}


//获取测试列表
function getcitylist($selectval=0,$addval='',$addkey='') {
	$sql='select name,id,pycode from sn_city where is_close = "N"';
	$arr=$GLOBALS[db]->getlist($sql);
	$optinstr="<select name='fm_city' id='fm_city' >";
	if($addval!==''&&$addkey!=='')
	{
		$optinstr.="<option value='".$addval."'>".$addkey."</option>";
	}
	foreach ($arr as $key => $value) {
		$optinstr.="<option value='";
		$optinstr.=$arr[$key]['id']==$selectval?$arr[$key]['id']."' selected>".$arr[$key]['name']."</option>":$arr[$key]['id']."' >".$arr[$key]['name']."</option>";

	}
	$optinstr.="</select > ";
	return $optinstr;
}







?>